<?php
/**
 * @Author: lianlianzan(13040@qq.com)
 * @Date:   2018-08-18 16:40:16
 * @Last Modified by:   zhaozilong
 * @Last Modified time: 2018-08-18 23:31:10
 */

namespace app\common\model;

use app\admin\model\Action;

use think\Request;

class ActionLog extends Base {
    
    protected $updateTime = false;

    //获取用户昵称
    public function getNicknameAttr($value,$data)
    {
    	$nickname = '';
    	if ($data['uid']>0) {
    		$nickname = User::where('uid',$data['uid'])->value('nickname');
    	}

        return $nickname;
    }

    //获取行为标识
    public function getActionNameAttr($value,$data)
    {
    	$name = '';
    	if ($data['action_id']>0) {
    		$name = Action::where('id',$data['action_id'])->value('name');
    	}

        return $name;
    }
}
